﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;

namespace GSAClient
{
    class Facet
    {
        public static String VALUE = "0";
        public static String RANGE = "1";
        private List<FacetValue> values;
        private String name;
        private String display_name;
        private bool is_range_value = false;

        public Facet(String name, String display_name)
        {
            this.name = name;
            this.display_name = display_name;
            this.values = new List<FacetValue>();
        }

        public String getDisplayName()
        {
            return display_name;
        }

        public List<FacetValue> getFacetValues()
        {
            return values;
        }
        public void addRangeValue(Double min, Double max, int count)
        {
            is_range_value = true;
            FacetValue fv = new FacetValue(min, max, count);
            values.Add(fv);
        }

        public void addTextValue(String fvname, int count)
        {
            FacetValue fv = new FacetValue(fvname, count);
            values.Add(fv);
        }

        public String getName()
        {
            return this.name;
        }

        public bool isRangeValue()
        {
            return this.is_range_value;
        }

    }
}